Skip to content

Pin setuptools<82 for pkg_resources compatibility#6273

Merged
richtja merged 1 commit intoavocado-framework:masterfrom
harvey0100:fix-rtd-docs-pkg-resources
Mar 3, 2026
Merged

Pin setuptools<82 for pkg_resources compatibility#6273
richtja merged 1 commit intoavocado-framework:masterfrom
harvey0100:fix-rtd-docs-pkg-resources

Conversation

@harvey0100
Copy link
Contributor

@harvey0100 harvey0100 commented Feb 23, 2026

setuptools 82.0.0 removed pkg_resources; avocado.core uses it (e.g. the
doc build imports it via conf.py). Pin setuptools>=45.0.0,<82 in
requirements-doc.txt and in setup.py install_requires so doc builds and
all installs get a compatible setuptools.

Temporary fix until Avocado is updated to new methods.

@harvey0100 harvey0100 self-assigned this Feb 23, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @harvey0100, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves an issue preventing the documentation build on Read the Docs. It achieves this by introducing a specific version constraint for the setuptools package within the documentation requirements, ensuring compatibility with existing dependencies that rely on pkg_resources.

Highlights

  • Read the Docs Build Fix: The pull request addresses a failure in the Read the Docs build process.
  • Dependency Pinning: The setuptools package has been pinned to a version less than 82 (<82) in requirements-doc.txt.
  • pkg_resources Dependency: This pinning is necessary because setuptools version 82.0.0 and above removed pkg_resources, which avocado.core (a dependency for documentation builds) still relies on.
Changelog
  • requirements-doc.txt
    • Added a version pin for setuptools to ensure compatibility with avocado.core during documentation builds.
    • Included a comment explaining the rationale behind the setuptools version constraint.
Activity
  • The pull request description indicates assistance from 'Cursor-Claude-4-Sonnet' in its creation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mr-avocado mr-avocado bot moved this to Review Requested in Default project Feb 23, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request correctly identifies the need to pin setuptools due to the removal of pkg_resources in recent versions. However, the breaking change actually occurred in setuptools version 72.0.0, not 82.0.0. The current pin of <82 will not prevent the installation of version 72 or later, which will cause the build to fail. Additionally, since avocado.core depends on pkg_resources, this pin should be applied to setup.py to ensure the library remains functional for all users, not just during documentation builds.

Comment on lines +2 to +3
# Pin <82: setuptools 82+ removed pkg_resources (avocado still uses it at doc build time)
setuptools>=45.0.0,<82

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The removal of pkg_resources occurred in setuptools version 72.0.0, not 82.0.0. Using <82 as a constraint will still allow the installation of version 72 and later, which will result in the same build failure. This should be updated to <72. Additionally, since avocado.core depends on pkg_resources, this pin should ideally be added to install_requires in setup.py to ensure the library remains functional for all users.

# Pin <72: setuptools 72+ removed pkg_resources (avocado still uses it at doc build time)
setuptools>=45.0.0,<72

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://setuptools.pypa.io/en/stable/history.html - Website states deprecated in 82.00 still available in version 81.0.0 will use that version to provide latest we can to core.

@harvey0100 harvey0100 force-pushed the fix-rtd-docs-pkg-resources branch from 8c585e3 to ae874a5 Compare February 23, 2026 12:54
@harvey0100 harvey0100 changed the title Fix Read the Docs build: pin setuptools<82 for pkg_resources Pin setuptools<82 for pkg_resources compatibility Feb 23, 2026
setuptools 82.0.0 removed pkg_resources; avocado.core uses it (e.g. the
doc build imports it via conf.py). Pin setuptools>=45.0.0,<82 in
requirements-doc.txt and in setup.py install_requires so doc builds and
all installs get a compatible setuptools.

Reference:
Assisted-By: Cursor-Claude-4-Sonnet
Signed-off-by: Harvey Lynden <hlynden@redhat.com>
@harvey0100 harvey0100 force-pushed the fix-rtd-docs-pkg-resources branch from ae874a5 to b931fda Compare February 23, 2026 12:56
@harvey0100 harvey0100 linked an issue Feb 23, 2026 that may be closed by this pull request
@harvey0100 harvey0100 added this to the 114 - Codename TBD milestone Feb 23, 2026
@harvey0100 harvey0100 added the bug label Feb 23, 2026
@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.80%. Comparing base (cbea52d) to head (b931fda).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6273      +/-   ##
==========================================
- Coverage   73.84%   73.80%   -0.04%     
==========================================
  Files         206      206              
  Lines       22565    22565              
==========================================
- Hits        16663    16654       -9     
- Misses       5902     5911       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@clebergnu clebergnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and the CI job is now passing! Thanks!

Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@richtja richtja merged commit e20bbce into avocado-framework:master Mar 3, 2026
60 checks passed
@github-project-automation github-project-automation bot moved this from Review Requested to Done 114 in Default project Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done 114

Development

Successfully merging this pull request may close these issues.

pkg_resources is deprecated and removed in python3.13

3 participants